﻿<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>admin</title>
	<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <link href="~/Scripts/miniui/themes/default/miniui.css" rel="stylesheet" type="text/css" />
    <link href="~/scripts/miniui/themes/jqueryui-cupertino/skin.css" rel="stylesheet" type="text/css" />
    <script src="~/Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="~/Scripts/miniui/miniui.js" type="text/javascript"></script>
	<link rel="stylesheet" type="text/css" href="~/themes/kingcens/css/reset.css">
	<link rel="stylesheet" type="text/css" href="~/themes/kingcens/css/style.css">
    <style>
        .qdiv a:link {color: white !important}
        .qdiv a:visited {color: white !important}
        .qdiv a:hover {color: white !important} 
        .qdiv a:active {color: white !important} 
    </style>
</head>
<body>
<div class="hander">
	<div class="site-nav-bd clearfix">
		<div class="site-nav-l clearfix">
			<a href="#" class="logo"><img src="~/themes/kingcens/images/Menu_13.jpg"></a>
			<div class="site-nav">
				<ul class="site-nav-list clearfix">
					<li class="site-nav-menu">
						<div class="nav-menu-hd">
							<span class="icon icon-base"></span>
							<span class="navname">基本资料</span>
						</div>
						<div class="service">
							<ul class="nav-menu-list">
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu01"></i>
										<a href="javascript:showTabById('GoodClassList','商品分类','../GoodClass/GoodClassList');" class="titName">商品分类</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu02"></i>
										<a href="javascript:showTabById('goodslist','商品资料','../Goods/GoodsList');" class="titName">商品资料</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu03"></i>
										<a href="javascript:showTabById('brand','品牌资料','../Brand/Brand');" class="titName">品牌资料</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu04"></i>
										<a href="javascript:showTabById('custome','客户资料','../Custom/Custom');" class="titName">客户资料</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu05"></i>
										<a href="javascript:showTabById('purchase','供应商资料','../Supply/Supply');" class="titName">供应商资料</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu06"></i>
										<a href="javascript:showTabById('storage','门店资料','../Stock/Stock');" class="titName">门店资料</a>
									</div>
								</li>								
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu07"></i>
										<a href="javascript:showTabById('Logistical','物流信息','../Logistical/Logistical');" class="titName">物流信息</a>
									</div>
								</li>                             					
							</ul>
						</div>
					</li>
                    <li class="site-nav-menu">
						<div class="nav-menu-hd">
							<span class="icon icon-purc"></span>
							<span class="navname">采购管理</span>
						</div>
						<div class="service">
							<ul class="nav-menu-list">
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu08"></i>
										<a href="javascript:showTabById('InsData','采购入库','../Bill/InsData?datatype=1&billid=0');" class="titName">采购入库</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu09"></i>
										<a href="javascript:showTabById('InrData','采购退货','../Bill/InsData?datatype=-1&billid=0');" class="titName">采购退货</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu10"></i>
										<a href="javascript:showTabById('BllListIns','采购单据列表','../Report/BllListIns?datatype=1');" class="titName">采购单据列表</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu11"></i>
										<a href="javascript:showTabById('BllDetailIns','采购明细查询','../Report/BllDetailIns?datatype=1');" class="titName">采购明细查询</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu12"></i>
										<a href="javascript:showTabById('RptDataSumIns','供应商供货汇表','../Report/RptDataSumIns?datatype=1001');" class="titName">供应商供货汇表</a>
									</div>
								</li>						
							</ul>
						</div>
					</li>
                    <li class="site-nav-menu">
						<div class="nav-menu-hd">
							<span class="icon icon-pos"></span>
							<span class="navname">零售管理</span>
						</div>
						<div class="service">
							<ul class="nav-menu-list">
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu21"></i>
										<a href="javascript:showTabById('SetReckoningDay','零售日结','../System/SetReckoningDay');" class="titName">零售日结</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu13"></i>
										<a href="javascript:showTabById('RptPosClassSum','收银汇总表','../Report/RptPosClassSum');" class="titName">收银汇总表</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu14"></i>
										<a href="javascript:showTabById('RptPosDataDetail','收银流水查询','../Report/RptPosDataDetail');" class="titName">收银流水查询</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu15"></i>
										<a href="javascript:showTabById('RptPosPayDetail','付款方式明细','../Report/RptPosPayDetail');" class="titName">付款方式明细</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu16"></i>
										<a href="javascript:showTabById('RptPosGoodsSum','商品销售排行','../Report/RptPosGoodsSum');" class="titName">商品销售排行</a>
									</div>
								</li>					
							</ul>
						</div>
					</li>
                    <li class="site-nav-menu">
						<div class="nav-menu-hd">
							<span class="icon icon-sale"></span>
							<span class="navname">批发管理</span>
						</div>
						<div class="service">
							<ul class="nav-menu-list">
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu17"></i>
										<a href="javascript:showTabById('OutData','销售出库','../Bill/OutData?datatype=2&billid=0');" class="titName">销售出库</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu18"></i>
										<a href="javascript:showTabById('OutDataRt','销售退货','../Bill/OutData?datatype=-2&billid=0');" class="titName">销售退货</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu19"></i>
										<a href="javascript:showTabById('BllListOut','销售单据列表','../Report/BllListOut?datatype=2');" class="titName">销售单据列表</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu20"></i>
										<a href="javascript:showTabById('BllDetailOut','销售明细查询','../Report/BllDetailOut?datatype=2');" class="titName">销售明细查询</a>
									</div>
								</li>	
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu21"></i>
										<a href="javascript:showTabById('RptDataSumOut','客户销售汇总','../Report/RptDataSumOut?datatype=2001');" class="titName">客户销售汇总</a>
									</div>
								</li>                                				
							</ul>
						</div>
					</li>
                    <li class="site-nav-menu">
						<div class="nav-menu-hd">
							<span class="icon icon-stock"></span>
							<span class="navname">库存管理</span>
						</div>
						<div class="service">
							<ul class="nav-menu-list">
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu01"></i>
										<a href="javascript:showTabById('InvData','库存调整','../Bill/InvData?datatype=3&billid=0');" class="titName">库存调整</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu02"></i>
										<a href="javascript:showTabById('BllListInv','库存调整单列表','../Report/BllListInv?datatype=3');" class="titName">库存调整单列表</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu03"></i>
										<a href="javascript:showTabById('BllDetailInv','库存调整单明细','../Report/BllDetailInv?datatype=3');" class="titName">库存调整单明细</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu04"></i>
										<a href="javascript:showTabById('StcData','库存盘点','../Bill/StcData?datatype=4&billid=0');" class="titName">库存盘点</a>
									</div>
								</li>	
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu05"></i>
										<a href="javascript:showTabById('BllListStc','库存盘点单列表','../Report/BllListStc?datatype=4');" class="titName">库存盘点单列表</a>
									</div>
								</li>     
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu06"></i>
										<a href="javascript:showTabById('BllDetailStc','库存盘点单明细','../Report/BllDetailStc?datatype=4');" class="titName">库存盘点单明细</a>
									</div>
								</li>   
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu07"></i>
										<a href="javascript:showTabById('RptStockTotal','商品库存情况','../Report/RptStockTotal?datatype=4001');" class="titName">商品库存情况</a>
									</div>
								</li>                                                                                           				
							</ul>
						</div>
					</li>
                    <li class="site-nav-menu">
						<div class="nav-menu-hd">
							<span class="icon icon-member"></span>
							<span class="navname">促销管理</span>
						</div>
						<div class="service">
							<ul class="nav-menu-list">
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu09"></i>
										<a href="javascript:showTabById('Coupon','礼券资料','../Coupon/Coupon');" class="titName">礼券资料</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu10"></i>
										<a href="javascript:showTabById('CouponSend','礼券发放','../Coupon/CouponSend');" class="titName">礼券发放</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu10"></i>
										<a href="javascript:showTabById('Promotion','促销方案','../Coupon/Promotion');" class="titName">促销方案</a>
									</div>
								</li>
							</ul>
						</div>
					</li>

                    <li class="site-nav-menu">
						<div class="nav-menu-hd">
							<span class="icon icon-member"></span>
							<span class="navname">会员管理</span>
						</div>
						<div class="service">
							<ul class="nav-menu-list">
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu08"></i>
										<a href="javascript:showTabById('Member','会员资料','../Member/Member');" class="titName">会员资料</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu11"></i>
										<a href="javascript:showTabById('MemberPoint','会员积分','../Member/MemberPayInfo?type=1');" class="titName">会员积分</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu12"></i>
										<a href="javascript:showTabById('MemberPay','会员充值','../Member/MemberPayInfo?type=0');" class="titName">会员充值</a>
									</div>
								</li>	
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu13"></i>
										<a href="javascript:showTabById('MemberPayDetail','充值明细','../Member/MemberPay?type=0');" class="titName">充值明细</a>
									</div>
								</li>                                                                                           				
							</ul>
						</div>
					</li>

                    <li class="site-nav-menu">
						<div class="nav-menu-hd">
							<span class="icon icon-mall"></span>
							<span class="navname">电商管理</span>
						</div>
						<div class="service">
							<ul class="nav-menu-list">
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu14"></i>
										<a href="javascript:showTabById('AdvertiseList','首页设置','../Mall/AdvertiseList')" class="titName">首页设置</a>
									</div>
								</li>	
                                <li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu17"></i>
										<a href="javascript:showTabById('MallData','订单管理','../Bill/MallData?datatype=5&billid=0');" class="titName">订单管理</a>
									</div>
								</li>                                 	
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu17"></i>
                                        <a href="javascript:showTabById('BllListMallOd','订单列表','../Report/BllListMallOd?datatype=5');" class="titName">订单列表</a>
									</div>
								</li>  
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu14"></i>
                                        <a href="javascript:showTabById('RptBllDetailMall','订单明细查询','../Report/BllDetailMall?datatype=7');" class="titName">订单明细查询</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu13"></i>
										<a href="javascript:showTabById('BllListWithdraw','返利提现列表','../Corp/BllListWithdraw?datatype=8');" class="titName">返利提现列表</a>
									</div>
								</li>
							</ul>
						</div>
					</li>
					<li class="site-nav-menu">
						<div class="nav-menu-hd">
							<span class="icon icon-report"></span>
							<span class="navname">报表分析</span>
						</div>
						<div class="service">
							<ul class="nav-menu-list">
								<li class="J_cat">
									<div class="service-float icon_arrow">
										<i class="icon service-icons submenu04"></i>
										<a href="#" class="titName">采购报表分析</a>
									</div>
									<ul class="service-float-item">
										<li>
											<i class="icon service-icons submenu15"></i>
											<a href="javascript:showTabById('RptInsPrice','进货单价分析','../Report/RptInsPrice');" class="titName delClass">进货单价分析</a>
										</li>
										<li>
											<i class="icon service-icons submenu16"></i>
											<a href="javascript:showTabById('RptInsAnalysis','进货汇总月报表','../Report/RptInsAnalysis');" class="titName delClass">进货汇总月报表</a>
										</li>
									</ul>
								</li>
								<li class="J_cat">
									<div class="service-float icon_arrow">
										<i class="icon service-icons submenu06"></i>
										<a href="#" class="titName">销售报表分析</a>
									</div>
									<ul class="service-float-item">
										<li>
											<i class="icon service-icons submenu17"></i>
											<a href="javascript:showTabById('RptSaleMonth','销售汇总月报表','../Report/RptSaleMonth');" class="titName delClass">销售汇总月报表</a>
										</li>
										<li>
											<i class="icon service-icons submenu17"></i>
											<a href="javascript:showTabById('RptSaleOrder','商品销售汇总表','../Report/RptSaleOrder');" class="titName delClass">商品销售汇总表</a>
										</li>
									</ul>
								</li>
								<li class="J_cat">
									<div class="service-float icon_arrow">
										<i class="icon service-icons submenu02"></i>
										<a href="#" class="titName">零售报表分析</a>
									</div>
									<ul class="service-float-item">
										<li>
											<i class="icon service-icons submenu18"></i>
											<a href="javascript:showTabById('RptPosDay','零售汇总日报表','../Report/RptPosDay');" class="titName delClass">零售汇总日报表</a>
										</li>
										<li>
											<i class="icon service-icons submenu19"></i>
                                            <a href="javascript:showTabById('RptPosMonth','零售汇总月报表','../Report/RptPosMonth');" class="titName delClass">零售汇总月报表</a>
										</li>
										<li>
											<i class="icon service-icons submenu20"></i>
		                                    <a href="javascript:showTabById('RptPosFlow','客流量分析报表','../Report/RptPosFlow');" class="titName delClass">客流量分析报表</a>
										</li>
									</ul>
								</li>
							</ul>
						</div>
					</li>
					<li class="site-nav-menu">
						<div class="nav-menu-hd">
							<span class="icon icon-pos"></span>
							<span class="navname">系统管理</span>
						</div>
						<div class="service">
							<ul class="nav-menu-list">
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu14"></i>
										<a href="javascript:showTabById('Users','用户管理','../User/Users')" class="titName">用户管理</a>
									</div>
								</li>								                                                                                     				
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu18"></i>
										<a href="javascript:showTabById('Power','权限管理','../Power/Power')" class="titName">权限管理</a>
									</div>
								</li>								                                                                                     				
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu07"></i>
										<a href="javascript:showTabById('SysSet','系统设置','../System/SysSet')" class="titName">系统设置</a>
									</div>
								</li>								                                                                                     				
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu50"></i>
										<a href="javascript:showTabById('SysGoods','商品库','../SysGoods/SysGoodsList')" class="titName">商品库</a>
									</div>
								</li>								                                                                                     				
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu50"></i>
										<a href="javascript:showTabById('CorpInfo','公司列表','../Corp/index')" class="titName">代理商管理</a>
									</div>
								</li>
								<li class="J_cat">
									<div class="service-float">
										<i class="icon service-icons submenu50"></i>
										<a href="javascript:showTabById('CorpInfo','商城设置','../Mall/MallSet')" class="titName">商城设置</a>
									</div>
								</li>
							</ul>
						</div>
                    </li>
				</ul>
			</div>
		</div>
		<div class="admin-name">
			<a href="#" class="userpic"><img src="~/themes/kingcens/images/Menu_10.jpg"></a>
			<span class="name">@ViewBag.FAppName</span>
            <span class="qdiv"><a href="#" onclick="Quit()"> [退出]</a></span>
		</div>
	</div>
</div>

    <div id="mainTabs" class="mini-tabs bg-toolbar" activeIndex="0" style="width:100%;height:90%;"      
        bodyStyle="border:0;background:#E9EDF9;" maskOnLoad="false" contextMenu="#tabsMenu" tabPosition ="top"> 
        <div name="tabdesktop" title="系统导航">

        </div>
    </div>

    <ul id="tabsMenu" class="mini-contextmenu" onbeforeopen="onBeforeOpen">        
        <li onclick="closeTab">关闭标签页</li>                
	    <li onclick="closeAllBut">关闭其他标签页</li>
	    <li onclick="closeAll">关闭所有标签页</li>        
        <li onclick="showAtPos">显示消息提醒</li> 
    </ul>
    <input type="hidden" id ="FSystemAppID" name="FSystemAppID" value="@ViewBag.FSystemAppID" />
    <input type="hidden" id ="FAppName" name="FAppName" value="@ViewBag.FAppName" />
    <input type="hidden" id ="FAppCode" name="FAppCode" value="@ViewBag.FAppCode"/>
    <input type="hidden" id ="FCompany" name="FCompany" value="@ViewBag.company"/>
    <div id="win1" class="mini-window" title="消息提醒" style="width:220px;height:300px;" 
        showMaxButton="true" showCollapseButton="true" showShadow="true"
        showToolbar="true" showFooter="true" showModal="false" allowResize="true" allowDrag="true">
        <div class="mini-fit" >
            <div id="datagrid1" class="mini-datagrid" style="width:95%;height:95%; top: 5px; left: 10px;"
                borderStyle="border:0;" url=""
                showPager = "false" showPageSize="false" showPageIndex="false"showColumns ="false"
                allowCellEdit="true"showHGridLines="false" showVGridLines="false">
                <div property="columns">                                                         
                    <!--<div field="FName" width="100px" headerAlign="center" >名称</div>-->
                    <div name="lname" width="100%" headerAlign="left">#</div>
                </div>
            </div>
        </div> 
    </div>

</body>
<script type="text/javascript" src="~/themes/kingcens/js/jquery-1.7.2.min.js"></script>
<script>
    $(".site-nav-list .site-nav-menu").on("mouseover", function () {
        $(this).find(".nav-menu-hd").addClass("pull-active").parent().siblings().find(".nav-menu-hd").removeClass("pull-active");
        $(this).find(".service").show().parent().siblings().find(".service").hide();
        $(".nav-menu-list .J_cat").on("mouseover", function () {
            $(this).addClass("pull-active").siblings().removeClass("pull-active");
            $(this).find(".service-float-item").show().parent().siblings().find(".service-float-item").hide();
        });
        $(".service-float-item li").on("mouseover", function () {
            $(this).addClass("pull-active").siblings().removeClass("pull-active");
        });
        $(".service-float-item li").on("mouseout", function () {
            $(this).removeClass("pull-active");
        });
        $(".nav-menu-list .J_cat").on("click", function () {
            $(".service, .service-float-item").hide();
        });
    });
    $(".site-nav-list .site-nav-menu").on("mouseout", function () {
        $(this).find(".nav-menu-hd").removeClass("pull-active");
        $(this).find(".service, .service-float-item").hide();
    });
</script>
<script type="text/javascript">
    mini.parse();

    var tabs = mini.get("mainTabs");
    var currentTab = null;
    loadDesktop();

    var grid = mini.get("datagrid1");

    tabs.on("beforecloseclick", function (e) {
        if (e.tab.name == "tabdesktop") {
            e.cancel = true;
        }
    });

    grid.on("drawcell", function (e) {
        var record = e.record,
        column = e.column,
        field = e.field,
        value = e.value;

        //action列，超连接操作按钮
        if (column.name == "lname") {
            e.cellStyle = "text-align:left";
            //e.cellHtml = '<a href="javascript:edit(\'' + record.FQty + '\')">' + record.FName + '</a>';

            var mhtml = '<a href="javascript:parent.rightFrame.showTabById('
                + "'" + record.FrmName + "','" + record.FCaption + "','" + record.FUrl + "');"
                + '"target="rightFrame" style="color: #000080">' + record.FName + '(</a>'
                + '<a style="color: #FF0000">' + record.FQty + '</a><a style="color: #000080">)</a>';
            e.cellHtml = mhtml;
        }
    });

    function getSystemAppID() {
        var mySysAppID = $("#FSystemAppID").val();
        return mySysAppID;
    }

    function getSystemCompany() {
        var mySysCompany = $("#FCompany").val();
        return mySysCompany;
    }

    function getSystemAppName() {
        var mySysAppName = $("#FAppName").val();
        return mySysAppName;
    }

    function getSystemAppCode() {
        var mySysAppCode = $("#FAppCode").val();
        return mySysAppCode;
    }

    function showAtPos() {
        var win = mini.get("win1");
        var x = "right";
        var y = "bottom";
        win.showAtPos(x, y);
    }

    function hideAtPos() {
        var win = mini.get("win1");
        win.hide();
    }

    function loadDesktop() {
        var tab = tabs.getTab("tabdesktop");
        //tabs.loadTab("../Home/desktopbootstrap", tab);
        tabs.loadTab("../Home/indexdesktop", tab);
    }

    function gotoLogin() {
        //当前用户失效，要重新登陆，否数据有问题
        //alert("当前用户与服务器失去连接，请重新登陆！");
        //parent.window.location.href = "default.aspx";
    }

    function reLogin() {
        //$.ajax({
        //    url: '/Data/AjaxService.aspx?method=LoginAgain',
        //    dataType: 'text',
        //    async: false,
        //    success: function (text) {
        //        var mdata = mini.decode(text);
        //        if (mdata.userid == "") {
        //            parent.window.location.href = "default.aspx";
        //        }
        //    }
        //});
    }

    function showTabById(tabid, tabtext, url) {
        var id = "tab$" + tabid;
        var tab = tabs.getTab(id);
        if (!tab) {
            tab = {};
            tab.name = id;
            tab.title = tabtext;
            tab.showCloseButton = true;
            if (url.indexOf("?") > 0) {
                tab.url = url;
            }
            tab.url = url;
            tabs.addTab(tab);
        }
        tabs.activeTab(tab);
    }


    function closeTab() {
        if (currentTab.name != 'tabdesktop') {
            tabs.removeTab(currentTab);
        }
    }
    function closeAllBut() {
        var but = [currentTab];
        but.push(tabs.getTab("tabdesktop"));
        tabs.removeAll(but);
    }
    function closeAll() {
        var tab = tabs.getTab("tabdesktop");
        tabs.removeAll(tab);
    }

    function onBeforeOpen(e) {
        currentTab = tabs.getTabByEvent(e.htmlEvent);
        if (!currentTab) {
            e.cancel = true;
        }
    }

    var bkcolor = "#000";
    $(function () {
        $(".navmain td").hover(function () {
            bkcolor = $(this).attr("color");
            if (bkcolor != "#FFFFFF")
                $(this).animate({ backgroundColor: "#C0C0C0" }, 1000);
        }, function () {
            $(this).animate({ backgroundColor: bkcolor }, 1000);
        });
    });

    function Quit() {
        $.post("../Home/Quit", {}, function (data) {
            $("#FSystemAppID").val("");
            window.location.href = "../Home/Login";
        });
    }
</script>
</html>